package be.quadreg.dojo.model.entity;

import java.util.Date;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.Persistent;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

import com.google.appengine.api.datastore.Key;

public class MemberSubscription {
	public static enum SubscriptionType {
		MONTH, YEAR
	};

	@Id
	private Long id;
	private Date subscriptionStart;
	private Date subscriptionEnd;

	private SubscriptionType subscriptionType;
	private double price;
	private String currency;
	
	public MemberSubscription() {
	}

	public MemberSubscription(Date subscriptionStart, Date subscriptionEnd,
			SubscriptionType subscriptionType, double price, String currency) {
		super();
		this.subscriptionStart = subscriptionStart;
		this.subscriptionEnd = subscriptionEnd;
		this.subscriptionType = subscriptionType;
		this.price = price;
		this.currency = currency;
	}

	public Long getId() {
		return id;
	}


	public void setId(Long id) {
		this.id = id;
	}


	public Date getSubscriptionStart() {
		return subscriptionStart;
	}

	public void setSubscriptionStart(Date subscriptionStart) {
		this.subscriptionStart = subscriptionStart;
	}

	public Date getSubscriptionEnd() {
		return subscriptionEnd;
	}

	public void setSubscriptionEnd(Date subscriptionEnd) {
		this.subscriptionEnd = subscriptionEnd;
	}

	public SubscriptionType getSubscriptionType() {
		return subscriptionType;
	}

	public void setSubscriptionType(SubscriptionType subscriptionType) {
		this.subscriptionType = subscriptionType;
	}

	public double getPrice() {
		return price;
	}

	public void setPrice(double price) {
		this.price = price;
	}

	public String getCurrency() {
		return currency;
	}

	public void setCurrency(String currency) {
		this.currency = currency;
	}

	
	@Override
	public String toString() {
		return "MemberSubscription [id=" + id + ", subscriptionStart="
				+ subscriptionStart + ", subscriptionEnd=" + subscriptionEnd
				+ ", subscriptionType=" + subscriptionType + ", price=" + price
				+ ", currency=" + currency + "]";
	}
	

}
